<%@ page  contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script language="javascript">
  function clear_auinfo()
  {
	  $.CurrentNavtab.find('#uname,#ucode').val("");
  }
  function auth_submit()
  {
	  $.CurrentNavtab.find("#authForm").submit();
  }
</script>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${pageContext.request.contextPath}/area/selectAuth.do" method="post">
        <div class="bjui-searchBar clearfix">
			<div class="search-group">         
			<input type="hidden" name="pageSize" value="${pagePara.pageSize }"/>
			<input type="hidden" name="pageIndex" value="${pagePara.pageIndex }"/>
			<input type="hidden" name="userCode" value="${area.userCode}"/>
	             <label>名称	：</label>
	            <input type="text"  name="uname" id="uname" size="10" value="${area.uname}"> 
	             <label>编号：</label>
	            <input type="text"  name="ucode" id="ucode" size="10" value="${area.ucode}"> 
	            <button type="submit" class="btn-default" data-icon="refresh">搜索</button>
	            <button type="button" class="btn-default" data-icon="refresh" onclick="clear_auinfo()">清空</button>
            </div>
        </div>
    </form>	
</div>
	<div class="bjui-pageContent tableContent">
	  <form name="authForm" id="authForm" method="post" data-toggle="validate" action="${pageContext.request.contextPath}/area/insertAuth.do">
	    <input type="hidden" name="userCode" value="${area.userCode}"/>
	    <table data-toggle="tablefixed" class="table table-bordered table-hover table-striped table-top center" data-width="100%">
	    	<thead>
				<tr>
				   <th><input type="checkbox" class="checkboxCtrl" data-group="areaCode" data-toggle="icheck"></th>
					<th>编号</th>
					<th>名称</th>	
					<th>备注</th>							
				    <th width="8%">操作</th>
				</tr>
	    	</thead>
	    	<tbody>
	    	<c:forEach var="rl" varStatus="status" items="${list}">
	    	<tr>
	    	            <td><input type="checkbox" name="areaCode" data-toggle="icheck" value="${rl.ucode}" <c:if test="${rl.checked}">checked</c:if>/></td>
			    		<td>${rl.ucode}</td>
						<td>${rl.uname}</td>	
						<td>${rl.memo}</td>						
	    		<td>
    				  <a href="<%=request.getContextPath()%>/area/edit.do?ucode=${rl.ucode}" 
    				  class="on-default edit-row" data-toggle="navtab" data-width="500" data-height="500" 
    				  data-id="area-add-tab" data-title="修改行政区划信息" data-mask="true"><i class="fa fa-pencil" title="修改"></i></a>
    				  <span class="btn-sep"></span>
    				  
    				 <a href="<%=request.getContextPath()%>/area/delete.do?ucode=${rl.ucode}" 
	    		    	class="on-default edit-row" data-toggle="doajax" data-confirm-msg="确定要删除吗？"><i class="fa fa-trash" title="删除"></i></a>
	    		</td>
	    	</tr>
	    	</c:forEach>
	    	</tbody>
	    </table>
	    </form>
	</div>
	
	<div class="bjui-pageFooter">
     <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="button" class="btn-default" data-icon="save" onclick="auth_submit()">保存</button></li>
    </ul>
</div>